import Vue from 'vue'
import VueRouter from 'vue-router'
import Avail from '../views/avail.vue'
import Delay from '../views/delay.vue'
import Mamp from '../views/mamp.vue'
import Sample from '@/views/sample'
import Drift from '@/views/drift'
import BreakDetail from '../views/break-detail.vue'
import Alerm from '../views/alerm.vue'
import Amplitude from '../views/amplitude.vue'
import Offline from '../views/offline.vue'
import Home from '../views/home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/delay',
    children: [
      {
        path: '/avail',
        name: 'Avail',
        component: Avail
      },
      {
        path: '/break',
        name: 'Break',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/break.vue')
      },
      {
        path: '/delay',
        name: 'Delay',
        component: Delay
      },
      {
        path: '/amplitude',
        name: 'Amplitude',
        component: Amplitude
      },
      {
        path: '/mamp',
        name: 'Mamp',
        component: Mamp
      },
      {
        path: '/sample',
        name: 'Sample',
        component: Sample
      },
      {
        path: '/drift',
        name: 'Drift',
        component: Drift
      },
      {
        path: '/breakdetail',
        name: 'BreakDetail',
        component: BreakDetail
      },
      {
        path: '/alerm',
        name: 'Alerm',
        component: Alerm
      },
      {
        path: '/offline',
        name: 'Offline',
        component: Offline
      },
      {
        path: '/information',
        name: 'information',
        component: () => import('@/views/information')
      }
    ]
  }

]

const router = new VueRouter({
  routes
})

export default router
